<template>
	<view>
		<title 
			:property="data.property" 
			:blockName="data.blockName"
			:divArea='divArea' 
			:listindex = 'listindex'
			:listblockindex="index">
		</title>
		
		<view v-for="(item2, index2) in data.data" :key="index2" v-show="data.property.isExpand!=undefined?data.property.isExpand:true">
			<styledate v-if="item2.style.colType=='datetime' && item2.style.colVisible" 
				:dataobj="item2.style" 
				:divArea='divArea' 
				:pagename='pageName'
				:listitemindex="index2"
				:listindex = 'listindex'
				:listblockindex="index"
				:isaddedit='isaddedit'
				:property="data.property"
				:clientType="clientType">
			</styledate>
			
			<textdigit v-else-if="(item2.coltype=='text' || item2.style.editStyle=='' || item2.style.editStyle=='edit' ||  item2.coltype=='digit' || item2.coltype=='number') && item2.style.colVisible && item2.style.tag.indexOf('[controltype]scan[/controltype]')==-1" 
				:divArea='divArea' 
				:pagename='pageName'
				:dataobj="item2.style" 
				:bigdatalist = 'bigdatalist'
				:name="item2.name" 
				:jsonoptions="jsonoptions"  
				:listindex = 'listindex'
				:listitemindex="index2" 
				:listblockindex="index" 
				:isaddedit='isaddedit'
				:property="data.property"
				:clientType="clientType">
			</textdigit>
			
			<stylelist v-else-if="(item2.style.editStyle=='dddw' && item2.style.dddw.name!='d_nvo_uipage_dwc') && item2.style.colVisible" 
				ref="stylelist"  
				:name="item2.name" 
				:divArea='divArea' 
				:pagename='pageName'
				:dataobj="item2.style" 
				:jsonoptions="jsonoptions" 
				:listitemindex="index2" 
				:listindex = 'listindex'
				:listblockindex="index" 
				:bigdatalist = 'bigdatalist'
				:isaddedit='isaddedit'
				:property="data.property"
				:clientType="clientType">
			</stylelist>
			
			<styleswitch v-else-if="item2.style.editStyle=='checkbox' && item2.style.colVisible"
				:divArea='divArea' 
				:pagename='pageName'
				:dataobj="item2.style" 
				:jsonoptions="jsonoptions" 
				:listitemindex="index2"
				:listindex = 'listindex'
				:listblockindex="index"
				:isaddedit='isaddedit'
				:property="data.property"
				:clientType="clientType">
			</styleswitch>
			
			<stylepicker  v-else-if="((item2.style.editStyle=='dddw' && item2.style.dddw.name=='d_nvo_uipage_dwc') || item2.style.editStyle=='ddlb' || item2.style.editStyle=='radiobuttons' ) && item2.style.colVisible" 
				ref="stylepicker"  
				:customlist="item2.style.codeTable" 
				:listtype='item2.style.editStyle' 
				:divArea='divArea' 
				:pagename='pageName'
				:dataobj="item2.style" 
				:listitemindex="index2"
				:listindex = 'listindex'
				:listblockindex="index"
				:isaddedit='isaddedit'
				:property="data.property"
				:clientType="clientType">
			</stylepicker>
			
			<textscan v-else-if="item2.style.tag.indexOf('[controltype]scan[/controltype]')!=-1 && jsonoptions.templatename!='appsj_scan_single'"
				:divArea='divArea' 
				:pagename='pageName'
				:dataobj="item2.style" 
				:bigdatalist = 'bigdatalist'
				:name="item2.name" 
				:jsonoptions="jsonoptions"  
				:listindex = 'listindex'
				:listitemindex="index2" 
				:listblockindex="index" 
				:isaddedit='true'
				:property="data.property"
				:clientType="clientType">
			</textscan>
			<view v-if="item2.visible && index2!=(data.data.length-1)" style=" height: 1px;width: 100%;border-bottom: #f0f0f0 1px dashed;"></view>
		</view> 
	</view>
</template>
 
<script>
	import title from "../title/title.vue"
	import {updaterowvalue} from '../../utils/representation.js'
	import textdigit from "../textdigit/textdigit.vue"
	import textscan from "../textscan/textscan.vue"
	import stylelist from "../stylelist/stylelist.vue"
	import stylepicker from "../stylepicker/stylepicker.vue"
	import styleswitch from "../styleswitch/styleswitch.vue"
	import stylelayer from "../stylelayer/stylelayer.vue"
	import styleedit from "../styleedit/styleedit.vue"
	import styledate from "../styledate/styledate.vue"
	
	export default {
		components:{
			title:title,
			textdigit:textdigit,
			textscan:textscan,
			stylelist:stylelist,
			stylepicker:stylepicker,
			styleswitch:styleswitch,
			stylelayer:stylelayer,
			styleedit:styleedit,
			styledate:styledate
		},
		
		props:{
			data:{
				type:Object,
				default(){
					return {
						property:{},
						blockName:''
					}
				}
			},
			jsonoptions:{
				type:Object
			},
			listindex:{
				type:Number,
				default(){
					return 0
				}
			},
			index:{
				type:Number,
				default(){
					return 0
				}
			},
			divArea:{
				type:String
			},
			isaddedit:{
				type:Boolean
			},
			bigdatalist:{
				type:Array
			},
			pageName:{
				type:String
			},
			clientType:{
				type:String
			}
		},
		
		mounted:function(){
		},
		
		methods:{
			updatedddwlistvalue(content,index,itemchanged){
				var that = this
				that.$refs.stylelist[index].updatedddwlistvalue(content,itemchanged)
			},
			
		}
	}
</script>

<style>
</style>
